// Use of this source code is governed by a BSD-style license
// that can be found in the License file.
//
// Author: Shuo Chen (chenshuo at chenshuo dot com)

#ifndef MUDUO_BASE_EXCEPTION_H
#define MUDUO_BASE_EXCEPTION_H

#include <muduo/base/Types.h>
#include <exception>

namespace muduo
{

	class Exception : public std::exception
	{
	public:
		explicit Exception(const char* what);
		explicit Exception(const string& what);
		virtual ~Exception() throw();
		virtual const char* what() const throw();
		const char* stackTrace() const throw();

	private:
		void fillStackTrace();

		string message_;
		string stack_;
	};

}

#endif  // MUDUO_BASE_EXCEPTION_H
